<?php
$this->sendDebugMessage("ready model start");

$user = $this->userCenter->userList[$ip];
$ready = $this->userCenter->roomList[$user->roomID]->tableList[$user->tableID]->seatList[$user->seatID]->ready();

//向本人发送准备状态
$response = new Response();
$response->event = "SE_READY_SUCCESS";
$response->body = '{"seatID":"'.$user->seatID.'","userID":"'.$ip.'","ready":"'.$ready.'"}';
$this->sendData($ip,$response);

//向当前游戏桌的其他玩家发送准备状态
$response->event = "SE_READY_UPDATE";
$this->broadcastGroup($response,$this->userCenter->roomList[$user->roomID]->tableList[$user->tableID]->getUserList(),array($ip));

$this->sendDebugMessage("ready model end");